<%@ page import="com.oriental.manage.core.enums.CompanyType" %><%--
  User: Yangxp
  Date: 2016/5/19
  Time: 15:55
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="core" uri="http://java.sun.com/jsp/jstl/core" %>
<core:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<body>
<div common-modal-form>
        <table class="table table-bordered">
            <tr>
                <td class="text-right">
                    商户类型：
                </td>
                <td  >
                    <select name="cusType" ng-model="vm.item.cusType" class="{{vm.constant.inputClass}}"
                            ng-options="key as value for (key,value) in  {'02':'企业商户','03':'个体工商户'} "  required>
                        <option value="">请选择商户类型</option>
                    </select>
                </td>
                <td class="text-right">
                    商户属性：
                </td>
                <td>
                    <select name="cusNature" ng-model="vm.item.cusNature" class="{{vm.constant.inputClass}}"
                            ng-options="key as value for (key,value) in  vm.cached.MERCHANT_PROPERTY "  required>
                        <option value="">请选择商户属性</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="text-right col-xs-3">
                    商户代码：
                </td>
                <td class="col-xs-4">
                    <input type="text" name="cusCode" ng-model="vm.item.cusCode"
                           class="{{vm.constant.inputClass}} " readonly
                           >
                    <%--<input type="text" name="cusType" ng-model="vm.item.cusType" ng-init="vm.item.cusType='02'" ng-hide="true">--%>
                    <input type="text" ng-model="vm.item.id"  ng-hide="true">
                    <input type="text" ng-model="vm.item.note" ng-hide="true">
                </td>
                <td class="text-right">
                    商户简称：
                </td>
                <td>
                    <input type="text" name="cusName" ng-model="vm.item.cusName" class="{{vm.constant.inputClass}} "
                           readonly >
                </td>
            </tr>
            <tr>
                <td class="text-right">
                    商户名称：
                </td>
                <td>
                    <input type="text" name="regName" ng-model="vm.item.regName" class="{{vm.constant.inputClass}} "
                           readonly  >
                </td>
                <td class="text-right">
                    商户英文名称：
                </td>
                <td>
                    <input type="text" name="cusNameEn" ng-model="vm.item.cusNameEn" class="{{vm.constant.inputClass}} "  maxlength="64"  ng-pattern="/^[\w]*$/">
                </td>
            </tr>
            <tr>

                <td class="text-right">
                    法人证件类型：
                </td>
                <td>
                    <select  name="docType" ng-model="vm.item.docType" class="{{vm.constant.inputClass}}"
                            ng-options="key as value for (key,value) in  vm.cached.LEGAL_CREDENTIALS_TYPE " required>
                        <option value="">请选择证件类型</option>
                    </select>
                </td>
                <td class="text-right">
                    法人证件号码：
                </td>
                <td>
                    <input type="text" name="docCode" ng-model="vm.item.docCode" class="{{vm.constant.inputClass}} " required maxlength="64"  ng-pattern="/^[\w]*$/" />
                </td>
            </tr>
            <tr>
                <td class="text-right">
                    法定代表人姓名：
                </td>
                <td>
                    <input type="text" name="legDocName" ng-model="vm.item.legDocName" class="{{vm.constant.inputClass}} " required maxlength="64" />
                </td>
                <td class="text-right">
                    法定代表人证件类型：
                </td>
                <td>
                    <select name="legDocType" ng-model="vm.item.legDocType" class="{{vm.constant.inputClass}}"
                            ng-options="key as value for (key,value) in  vm.cached.PO_CREDENTIALS_TYPE " required >
                        <option value="">请选择证件类型</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="text-right">
                    法定代表人（负责人）证件号码：
                </td>
                <td>
                    <input type="text" name="legDocCode" ng-model="vm.item.legDocCode" class="{{vm.constant.inputClass}} " required maxlength="64" ng-pattern="/^[\w]*$/">
                </td>
                <td class="text-right">
                    商户行业类别：
                </td>
                <td>
                    <input type="text" name="induType" ng-model="vm.item.induType" class="{{vm.constant.inputClass}} " required maxlength="100">
                </td>
            </tr>
            <tr>
                <td class="text-right">
                    收款账\卡号：
                </td>
                <td>
                    <input type="text" name="bankNo" ng-model="vm.item.bankNo" class="{{vm.constant.inputClass}} " required maxlength="32" ng-pattern="/^[\w]*$/">
                </td>
                <td class="text-right">
                    收款账\卡号开户行：
                </td>
                <td>
                    <input type="text" name="openBank" ng-model="vm.item.openBank" class="{{vm.constant.inputClass}} " required maxlength="128">
                </td>
            </tr>
            <tr>
                <td class="text-right">
                    商户注册地址(省)：
                </td>
                <td>
                    <select name="regAddrProv" ng-model="vm.item.regAddrProv" class="{{vm.constant.inputClass}}"
                            ng-options="key as value for (key,value) in  vm.cached.ALL_AREA_CODE " >
                        <option value="">请选择省份代码</option>
                    </select>
                    <span ng-if="vm.item.cusNature=='01'||vm.item.cusNature=='03'" style="color: red;font-weight: bold">*</span>
                </td>
                <td class="text-right">
                    商户注册地址详情：
                </td>
                <td>
                    <input type="text" name="regAddrDetail" ng-model="vm.item.regAddrDetail" class="{{vm.constant.inputClass}} " maxlength="256"  >
                    <span ng-if="vm.item.cusNature=='01'||vm.item.cusNature=='03'" style="color: red;font-weight: bold">*</span>
                </td>
            </tr>
            <tr>
                <td class="text-right">
                    商户经营地址(省)：
                </td>
                <td>
                    <select name="addrProv" ng-model="vm.item.addrProv" class="{{vm.constant.inputClass}}"
                            ng-options="key as value for (key,value) in  vm.cached.ALL_AREA_CODE " >
                        <option value="">请选择省份代码</option>
                    </select>
                    <span ng-if="vm.item.cusNature=='01'||vm.item.cusNature=='03'" style="color: red;font-weight: bold">*</span>
                </td>
                <td class="text-right">
                    商户经营地址详情：
                </td>
                <td>
                    <input type="text" name="addrDetail" ng-model="vm.item.addrDetail" class="{{vm.constant.inputClass}} " maxlength="256" >
                    <span ng-if="vm.item.cusNature=='01'||vm.item.cusNature=='03'" style="color: red;font-weight: bold">*</span>
                </td>
            </tr>
            <tr>
                <td class="text-right">
                    网址：
                </td>
                <td>
                    <input type="text" name="url" ng-model="vm.item.url" class="{{vm.constant.inputClass}}" maxlength="64" ng-pattern="/^(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?$/" >
                    <span ng-if="vm.item.cusNature=='02'" style="color: red;font-weight: bold">*</span>
                </td>
                <td class="text-right">
                    服务器IP：
                </td>
                <td>
                    <%--((?:(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))\.){3}(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d))))--%>
                    <input type="text" name="serverIp" ng-model="vm.item.serverIp" class="{{vm.constant.inputClass}} " maxlength="16" ng-pattern="/^((?:(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))\.){3}(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d))))$/" >
                        <span ng-if="vm.item.cusNature=='02'" style="color: red;font-weight: bold">*</span>
                </td>
            </tr>
            <tr>
                <td class="text-right">
                    ICP备案编号：
                </td>
                <td>
                    <input type="text" name="icp" ng-model="vm.item.icp" class="{{vm.constant.inputClass}} " maxlength="20" ng-pattern="/^[\w]*$/" >
                    <span ng-if="vm.item.cusNature=='02'" style="color: red;font-weight: bold">*</span>
                </td>
                <td class="text-right">
                    商户联系人：
                </td>
                <td>
                    <input type="text" name="contName" ng-model="vm.item.contName" class="{{vm.constant.inputClass}} " required maxlength="64">
                </td>
            </tr>
            <tr>
                <td class="text-right">
                    商户联系电话：
                </td>
                <td>
                    <input type="text" name="contPhone" ng-model="vm.item.contPhone" class="{{vm.constant.inputClass}} " maxlength="32" ng-pattern="/^(\(\d{3,4}\)|\d{3,4}-|\s)?\d{7,14}$/" required>
                </td>
                <td class="text-right">
                    商户E-mail：
                </td>
                <td>
                    <input type="text" name="cusEmail" ng-model="vm.item.cusEmail" class="{{vm.constant.inputClass}} " maxlength="64" ng-pattern="/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/">
                </td>
            </tr>
            <tr>
                <td class="text-right">
                    商户经营地区范围：
                </td>
                <td>
                   <span ng-repeat="bean in vm.item.areaList track by $index">
                    <select name="occurarea"  ng-model="bean.code" class="{{vm.constant.inputClass}}"
                            ng-options="key as value for (key,value) in  vm.cached.ALL_AREA_CODE " >
                        <option value="">请选择省份代码</option>
                    </select>
                    <button ng-click="vm.addOccurarea($index)"><i class="glyphicon glyphicon-plus"></i></button>
                    <button ng-click="vm.deleteOccurarea($index)"><i class="glyphicon glyphicon-minus"></i></button>
                   </span>
                    <span ng-if="vm.item.cusNature=='01'||vm.item.cusNature=='03'" style="color: red;font-weight: bold">*</span>
                </td>
                <td class="text-right">
                    商户状态：
                </td>
                <td>
                    {{vm.cached.MERCHANT_STATUS[vm.item.status]}}
                    <input name="status"  type="text" class="{{vm.constant.inputClass}}" value="{{vm.item.status}}"
                           ng-model="vm.item.status" ng-hide="true" />

                </td>
            </tr>
            <tr>
                <td class="text-right">
                    清算网络：
                </td>
                <td colspan="3">
                    <span ng-repeat="netType in networkTypes">
                        <input type="checkbox"   ng-checked="isNetChecked(netType.id)" ng-click="updateSelection($event,netType.id)" />{{netType.name}}
                    </span>
                    <span style="color: red;font-weight: bold">*</span>
                </td>
            </tr>
            <tr>
                <td class="text-right">
                    商户上线日期：
                </td>
                <td>
                    <input name="startTime"  type="text" class="{{vm.constant.inputClass}}" uib-datepicker-popup="yyyy-MM-dd"
                           ng-model="vm.item.startTime" required/>
                    <%--<span ng-if="vm.item.status=='01'" style="color: red;font-weight: bold">*</span>--%>
                </td>
                <td class="text-right">
                    商户下线日期：
                </td>
                <td>
                    <input name="endTime"  type="text" class="{{vm.constant.inputClass}}" uib-datepicker-popup="yyyy-MM-dd"
                           ng-model="vm.item.endTime"  />
                    <span ng-if="vm.item.status=='03'" style="color: red;font-weight: bold">*</span>
                </td>
            </tr>
            <tr>
                <td class="text-right">
                    合规风险状况：
                </td>
                <td>
                    <select name="riskStatus" ng-model="vm.item.riskStatus" class="{{vm.constant.inputClass}}"
                            ng-options="key as value for (key,value)  in vm.cached.COMPLIANCE_RISK " required >
                        <option value="">请选择合规风险状况</option>
                    </select>
                </td>
                <td class="text-right">
                    股东信息：
                </td>
                <td>
                    <input type="text" name="shareHolder" ng-model="vm.item.shareHolder" class="{{vm.constant.inputClass}} " maxlength="1024">
                </td>
            </tr>
            <tr>
                <td class="text-right">
                    开通业务种类：
                </td>
                <td>
                     <span ng-repeat="open in openTypes">
                        <input type="checkbox"   ng-checked="isOpenChecked(open.id)" ng-click="updateOpenSelection($event,open.id)" />{{open.name}}
                    </span>
                    <span ng-if="vm.item.cusNature=='01'||vm.item.cusNature=='03'" style="color: red;font-weight: bold">*</span>
                    <%--<input type="checkbox" name="openType"  value="01">POS--%>
                    <%--<input type="checkbox" name="openType"  value="02">条码--%>
                    <%--<input type="checkbox" name="openType"  value="99">其他--%>
                </td>
                <td class="text-right">
                    计费类型：
                </td>
                <td>
                    <select name="chageType" ng-model="vm.item.chageType" class="{{vm.constant.inputClass}}"
                            ng-options="key as value for (key,value)  in vm.cached.CHARGE_TYPE "  >
                        <option value="">请选择计费类型</option>
                    </select>
                    <span ng-if="vm.item.cusNature=='01'||vm.item.cusNature=='03'" style="color: red;font-weight: bold">*</span>
                </td>
            </tr>
            <tr>
                <td class="text-right">
                    支持账户类型：
                </td>
                <td>
                    <select name="accountType" ng-model="vm.item.accountType" class="{{vm.constant.inputClass}}"
                            ng-options="key as value for (key,value)  in vm.cached.SUPPORT_ACCOUNT_TYPE " required>
                        <option value="">请选择支持账户类型</option>
                    </select>
                </td>
                <td class="text-right">
                    拓展方式：
                </td>
                <td>
                    <%--<select name="expandType" ng-model="vm.item.expandType" class="{{vm.constant.inputClass}}"--%>
                            <%--ng-options="key as value for (key,value) in vm.cached.EXPANSION_MODE "  required>--%>
                        <%--<option value="">请选择拓展方式</option>--%>
                    <%--</select>--%>
                   <input type="text" name="shareHolder" ng-model="vm.item.expandType" class="{{vm.constant.inputClass}} " maxlength="1024" ng-init="vm.item.expandType='01'" ng-hide="true">
                   <input type="text" name="shareHolder_bak" class="{{vm.constant.inputClass}} " maxlength="1024" value="自主拓展" readonly >
                </td>
            </tr>
            <%--<tbody ng-if="vm.item.expandType=='02'">--%>
            <%--<tr ng-if="vm.item.expandType=='02'">--%>
                <%--<td class="text-right">--%>
                    <%--外包服务机构名称：--%>
                <%--</td>--%>
                <%--<td>--%>
                    <%--<input name="outServiceName" type="text" ng-model="vm.item.outServiceName" class="{{vm.constant.inputClass}} " maxlength="128" >--%>
                    <%--<span ng-if="vm.item.expandType=='02'" style="color: red;font-weight: bold">*</span>--%>
                <%--</td>--%>
                <%--<td class="text-right">--%>
                    <%--外包服务机构法人证件类型：--%>
                <%--</td>--%>
                <%--<td>--%>
                    <%--<select  name="outServiceCardType" ng-model="vm.item.outServiceCardType" class="{{vm.constant.inputClass}}"--%>
                             <%--ng-options="key as value for (key,value) in  vm.cached.LEGAL_CREDENTIALS_TYPE " >--%>
                        <%--<option value="">请选择证件类型</option>--%>
                    <%--</select>--%>
                    <%--<span ng-if="vm.item.expandType=='02'" style="color: red;font-weight: bold">*</span>--%>
                    <%--&lt;%&ndash;<input type="text" name="outServiceCardType" ng-model="vm.item.outServiceCardType" class="{{vm.constant.inputClass}} ">&ndash;%&gt;--%>
                <%--</td>--%>
            <%--</tr>--%>
            <%--<tr >--%>
                <%--<td class="text-right">--%>
                    <%--外包服务机构法人证件号码：--%>
                <%--</td>--%>
                <%--<td>--%>
                    <%--<input type="text" name="outServiceCardCode" ng-model="vm.item.outServiceCardCode" class="{{vm.constant.inputClass}} " maxlength="64" ng-pattern="/^[\w]*$/" >--%>
                    <%--<span ng-if="vm.item.expandType=='02'" style="color: red;font-weight: bold">*</span>--%>
                <%--</td>--%>
                <%--<td class="text-right">--%>
                    <%--外包服务机构法定代表人证件类型：--%>
                <%--</td>--%>
                <%--<td>--%>
                    <%--<select name="outServiceLegCardType" ng-model="vm.item.outServiceLegCardType" class="{{vm.constant.inputClass}}"--%>
                            <%--ng-options="key as value for (key,value) in  vm.cached.PO_CREDENTIALS_TYPE " >--%>
                        <%--<option value="">请选择证件类型</option>--%>
                    <%--</select>--%>
                    <%--<span ng-if="vm.item.expandType=='02'" style="color: red;font-weight: bold">*</span>--%>
                    <%--&lt;%&ndash;<input type="text" name="outServiceLegCardType" ng-model="vm.item.outServiceLegCardType" class="{{vm.constant.inputClass}} ">&ndash;%&gt;--%>
                <%--</td>--%>
            <%--</tr>--%>
            <%--<tr>--%>
                <%--<td class="text-right">--%>
                    <%--外包服务机构法定代表人证件号码：--%>
                <%--</td>--%>
                <%--<td>--%>
                    <%--<input type="text" name="outServiceLegCardCode" ng-model="vm.item.outServiceLegCardCode" class="{{vm.constant.inputClass}} " maxlength="64" ng-pattern="/^[\w]*$/" >--%>
                    <%--<span ng-if="vm.item.expandType=='02'" style="color: red;font-weight: bold">*</span>--%>
                <%--</td>--%>
                <%--<td></td>--%>
                <%--<td></td>--%>
            <%--</tr>--%>
            <%--</tbody>--%>
        </table>
</div>
</body>
</html>
